﻿<!-- 继承公共视图文件 -->
<!-- 方法一：-->
<!-- <extend name="./Application/Admin/View/layout.html" /> -->
<!-- 方法二：-->
<extend name="Public:layout" />
<block name="mid">
<div class="row">
	<div class="col-lg-12">
		<div class="panel">
			<div class="panel-heading bk-bg-primary">
				<h6><i class="fa fa-table red"></i><span class="break"></span>广告列表</h6>
				<div class="panel-actions">
					<a href="table.html#" class="btn-setting"><i class="fa fa-rotate-right"></i></a>
					<a href="table.html#" class="btn-minimize"><i class="fa fa-chevron-up"></i></a>
					<a href="table.html#" class="btn-close"><i class="fa fa-times"></i></a>
				</div>
			</div>

			<div class="panel-body">
				<form action="" method="get"  class="form-horizontal">
					<div class="form-group">
						<div class="row">
							<div class="input-inline col-md-1">
								<select id="select" name="category_id" class="form-control" size="1">
									<option value="-1">所有商品分类</option>}
								</select>
							</div>
							<div class="input-inline col-md-1">
								<select id="select" name="catregory_id" class="form-control" size="1" >
									<option value="-1">所有品牌</option>
								</select>
							</div>
							<div class="input-inline col-md-1">
								<select id="select" name="show_id" class="form-control" size="1" >
									<option value="0">全部</option>
									<option value="1">上架</option>
									<option value="99">下架</option>
								</select>
							</div>
							<div class="input-inline col-md-1">
								<select id="select" name="show_id" class="form-control" size="1" >
									<option value="0">全部</option>
									<option value="1">新品</option>
									<option value="99">热销</option>
									<option value="99">推荐</option>
								</select>
							</div>

							<div class="input-inline col-md-2">
								<div class="input-group">
									<span class="input-group-btn">
										<button type="button" class="btn btn-info">
											<i class="fa fa-search"></i>
										</button>
									</span>
									<input id="input-group" class="form-control" name="name" value="" type="text" placeholder="输入关键字">
								</div>
							</div>
							<div class="input-inline col-md-1">
								<div class="input-group">
									<span class="input-group-btn">
										<button type="submit" class="btn btn-info">
											<i class="fa fa-search">&nbsp;条件筛选</i>
										</button>
									</span>
								</div>
							</div>

						</div>
					</div>
				</form>

				<form action="" method="" class="form-horizontal" >
					<div class="row">
						<div class="input-inline col-md-1">
							<select id="select" name="category_id" class="form-control" size="1">
								<option value="-1">请选择</option>
								<option value="-1">删除</option>
								<option value="-1">已审核</option>
								<option value="-1">未审核</option>
								<option value="-1">下架</option>
								<option value="-1">上架</option>
							</select>
						</div>

						<div style="height:32px;" class="input-inline col-md-1">
							<button style="height:32px;" type="submit" class="btn btn-info">确定</button>
						</div>
						<div style="height:32px;" class=" pull-right input-inline col-md-1">
							<a style="height:32px;" href="{:U('Admin/banner/add_banner')}" class="btn btn-success"><i class="fa fa-plus"></i>&nbsp;添加广告</a>
						</div>
						<!-- <div style="height:32px;" class=" pull-right input-inline col-md-2">
							<a style="height:32px;" href="{:U('Admin/banner/add_point')}" class="btn btn-success"><i class="fa fa-plus"></i>&nbsp;添加广告位</a>
						</div>
 -->
					</div>

				</form>

			</div>

			<div class="panel-body">
				<div class="table-responsive">
					<table class="table table-striped table-bordered bootstrap-datatable datatable">
						<thead>
							<tr>
								<th></th>
								<th width="50">ID</th>
								<th width="100">图片</th>
								<th>广告位置</th>
								<th>名称</th>
								<th>链接</th>
								<th>排序</th>
								<th>是否显示</th>
								<th>上线时间</th>
								<th>下线时间</th>
								<th>基本操作</th>
							</tr>
						</thead>
						<tbody>
						<!-- 每循环一次就从list取数据，v就是一维数组 通过v来访问字段名称 -->
						<!-- 显示的时候  必须要都写成小写的 adminpic：adminpic-->
						<foreach name="list" key="k" item="v" >
							<tr>
								<td><input type="checkbox" name="" value=""></td>
								<td>{$v.id}</td>
								<td><img  width="300" height="150" src="__ROOT__/{$v.pic}"></td>
								<td>{$v.banner_point.name}</td>
								<td>{$v.b_name}</td>
								<td>{$v.http}</td>
								<td>{$v.sort}</td>
								<td>{$v['is_show']?'显示':'隐藏'}</td>
								<td>{:date('Y-m-d H:i:s',$v['up_time'])}</td>
								<td>{:date('Y-m-d H:i:s',$v['down_time'])}</td>
								<td>
									<a class="btn btn-success" href="table.html#">
										<i class="fa fa-search-plus "></i>
									</a>
									<a class="btn btn-info" href="{:U('admin/admin/edit/id/'.$v['id'])}">
										<i class="fa fa-edit "></i>
									</a>
									<a class="btn btn-danger" href="table.html#">
										<i class="fa fa-trash-o "></i>
									</a>
								</td>
							</tr>
							</foreach>
						</tbody>
					</table>
					<!-- 页码 -->
					<div class="bk-margin-5 btn-group">
						{$page}
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
</block>
